part of '../animation.dart';

extension AnimationControllerOperation on AnimationController {
  void loop() {
    // 第一推动力
    forward();
    // 来回循环
    addStatusListener((status) {
      if (status == AnimationStatus.completed) {
        reverse();
      } else if (status == AnimationStatus.dismissed) {
        forward();
      }
    });
  }
}
